home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
fido
/
XPACK275.lha
/
rexx
/
SendFile.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-04-06
|
1KB
|
43 lines
/**/
v='$VER: SendFile Rexx Crash File Queuer Williamson 55.05'
options results
options failat 20
parse upper arg site jf as
if site="" | jf="" then do
say 'Usage: SendFile 5daddress fullpathfilename [sendas] [disposition]'
say 'Priority is always 50'
say 'Disposition defaults to Leave'
exit
end
if ~show("L", "xferq.library") then;if ~addlib("xferq.library",0,-30,0) then do;Say "Couldn't access xferq.library!";exit 20;end
if ~(exists(jf)) then do;Say 'Cannot find ['jf']';return 1;end
as=strip(as)
if as="" then do
as=get_fn(jf)
dsp=0
end;else do
if length(as)=1 then do
adsp=upper(as)
as=get_fn(jf)
end;else do
if words(as)=1 then adsp="L"
else do
adsp=upper(word(as,2))
as=word(as,1)
end
end
if upper(adsp)='D' then dsp=1
else dsp=0
end
if XfqAddWorkQuick(site,jf,as,50,dsp) then Say 'Queued 'jf' as 'as' for 'site
else Say "File "jf" is already queued for "site
say "Result:"XFQERRORCODE":"XFQERRORMSG
drop XFQERRORCODE XFQERRORMSG
call XfqClose()
exit
get_fn:
if lastpos('/',arg(1))~=0 then return substr(arg(1),lastpos('/',arg(1))+1)
else if lastpos(':',arg(1))~=0 then return substr(arg(1),lastpos(':',arg(1))+1)
else return arg(1)